window.onload = function() {
	window.addEventListener('updateUser', function(event) {
		//	 	console.log(event.detail.name);
		document.getElementById("dlzc").removeEventListener('tap', MY);
		document.getElementById("dlzc").innerText = event.detail.name;
		
		//登陆之后可以点击编辑个人资料
		document.getElementById("bjgr").addEventListener('tap', function() {
			mui.openWindow({
				url: './html/gerenZX.html',
				id: 'gerenZX.html',
				
			});
			var preXinxi = plus.webview.currentWebview().opener();
			mui.fire(preXinxi,"userXinxi",{
				name:event.detail.name,
				
			});
			
			mui.currentWebview.close();

		});
		////////////////////////////////////////////////////////////////////////////////////////////
		//个人信息页面
		
		
		
		
		
		
		
		

		

	});

//////////////////////////////////////////////////////////////////////////////////////////////////
	//首页跳转
	function MY() {
		mui.openWindow({
			url: './html/denglu.html'
		})
	}
	document.getElementById("dlzc").addEventListener('tap', MY);

	//跳转查找
	document.getElementById("chazhao").addEventListener('tap', function() {
		mui.openWindow({
			url: './html/chazhao.html'
		});
	});
	//跳转黑名单
	document.getElementById("heimingdan").addEventListener('tap', function() {
		mui.openWindow({
			url: './html/heimingdan.html'
		});
	});
	//本地作品
	document.getElementById("bendi").addEventListener('tap', function() {
		mui.openWindow({
			url: './html/bendizuopin.html'
		});
	});
	//退出登录
	document.getElementById("tuichu").addEventListener('tap', function() {
		localStorage.clear();   
		mui.openWindow({
			url: './html/denglu.html'
		});
	});
	//视频详情
	document.getElementById("shipin").addEventListener('tap', function() {
		mui.openWindow({
			url: './html/shipinXiang.html'
		});
	});

	
	//点击摄像头
	//	document.getElementById("lushipin").addEventListener('tap',function(){
	//		mui('.bottomPopover').popover('toggle');
	//	});

}